<template>
  <div>
    <MyDialog ref="dialog" v-bind="$attrs" @confirm="confirm">
      <MyForm ref="form" v-bind="$attrs" v-on="$listeners"></MyForm>
    </MyDialog>
  </div>
</template>

<script>
export default {
  name: "DF",
  inheritAttrs: false,
  mounted() {
    const { show, hide, start, stop } = this.$refs.dialog;
    Object.assign(this, { show, hide, start, stop });
  },
  methods: {
    async confirm() {
      try {
        await this.$refs.form.validate();
        this.$emit("confirm");
      } catch (error) {}
    },
  },
};
</script>

<style scoped >
</style>
